From 5e1d53000a9777fb68904222ea42800006caac0c Mon Sep 17 00:00:00 2001 From: justbur Date: Sat, 15 Aug 2015 20:26:14 -0400 Subject: [PATCH] Switch prefix-titles to key-seq as key --- which-key.el | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/which-key.el b/which-key.el index 9a5b42e0d3e..c1c1793a058 100644 --- a/which-key.el +++ b/which-key.el @@ -119,11 +119,11 @@ emacs-lisp-mode." :group 'which-key) (defcustom which-key-prefix-title-alist '() - "An alist with elements f the form (key-sequence . prefix-title). -key-sequence and prefix-title are both strings. key-sequence is a -string suitable for calling the `kbd' function on. The title is -displayed alongside the actual current key sequence when -`which-key-show-prefix' is set to either top or echo." + "An alist with elements of the form (key-sequence . prefix-title). +key-sequence is a sequence of the sort produced by `kbd'. +prefix-title is a both string. The title is displayed alongside +the actual current key sequence when `which-key-show-prefix' is +set to either top or echo." :group 'which-key :type '(alist :key-type string :value-type string)) @@ -1033,9 +1033,11 @@ enough space based on your settings and frame size." prefix-keys) (dash-w-face (propertize "-" 'face 'which-key-key-face)) (status-left (propertize (format "%s/%s" (1+ page-n) n-pages) 'face 'which-key-separator-face)) - (status-top (when (assoc prefix-keys which-key-prefix-title-alist) + (status-top (when (assoc which-key--current-prefix + which-key-prefix-title-alist) (propertize - (cdr (assoc prefix-keys which-key-prefix-title-alist)) + (cdr (assoc which-key--current-prefix + which-key-prefix-title-alist)) 'face 'which-key-note-face))) (status-top (concat status-top (when (< 1 n-pages) -- 2.30.2